﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CreateUser.aspx.cs" Inherits="Pages_CreateUser" %>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

   <div>
            <center>
                <table border="0" cellpadding="1" cellspacing="2" width="30%">
                    <tr>
                        <td align="center" colspan="2" style="font-weight: bold; font-size: 0.9em; color: white;
                            background-color: #5d7b9d; display: none">
                            <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                            <asp:HiddenField ID="hdnUserId" runat="server" />
                            <asp:HiddenField ID="hdnLoggedInUser" runat="server" />
                        </td>
                    </tr>
                    <tr runat="server" id="trMessage" visible="false">
                        <td colspan="2">
                            <div class="alert">
                                User Created Successfully.</div>
                        </td>
                    </tr>
                    <tr runat="server" id="trError" visible="false">
                        <td colspan="2">
                            <div class="error">
                                User Already Exists.</div>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2" style="font-weight: bold; font-size: 0.9em; color: white;
                            background-color: #5d7b9d">
                            Create User
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            User Name:</td>
                        <td align="left">
                            <asp:TextBox ID="txtUserName" runat="server" Font-Size="0.8em" Width="90%"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtUserName"
                                runat="server" ErrorMessage="User Name Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Password:</td>
                        <td align="left" >
                            <asp:TextBox ID="txtPassword" runat="server" Font-Size="0.8em" Width="90%" TextMode="Password"
                                CausesValidation="True"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtPassword"
                                runat="server" ErrorMessage="Password Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Role:
                        </td>
                        <td align="left" >
                            <asp:DropDownList ID="ddlRole" runat="server" Width="93%">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Name:
                        </td>
                        <td align="left" >
                            <asp:TextBox ID="txtName" runat="server" Font-Size="0.8em" Width="90%" CausesValidation="True"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtName"
                                runat="server" ErrorMessage="Name Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Address:
                        </td>
                        <td align="left" >
                            <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Font-Size="0.8em"
                                Width="92%" CausesValidation="True"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtAddress"
                                runat="server" ErrorMessage="Address Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" colspan="2" style="text-align: center">
                            <asp:Button ID="btnCreate" SkinID="DefaultButton" runat="server" Text="Create User"
                                OnClick="btnCreate_Click" />
                            <asp:Button ID="btnClear" SkinID="DefaultButton" runat="server" Text="Reset" ValidationGroup="Rest" />
                        </td>
                    </tr>
                    <tr>
                    <td align="left" colspan="2">
                    <asp:ValidationSummary ID="ValSum" runat="server" ShowSummary="true" />
                    </td>
                    </tr>
                </table>
            </center>
        </div>
</asp:Content>

